home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_tkcvs.idb / usr / freeware / lib / tkcvs / update.tcl.z / update.tcl
Encoding:
Text File  |  1999-04-16  |  1.3 KB  |  60 lines

  1. #
  2. # Tcl Library for tkCVS
  3. #
  4.  
  5. # $Id: update.tcl,v 1.5 1995/08/19 11:47:32 del Exp $
  6. #
  7. # Set up a small update dialog.
  8. #
  9.  
  10. proc update_setup {} {
  11.  
  12.   toplevel .update
  13.   frame .update.left
  14.   frame .update.right
  15.   frame .update.down -relief groove -border 2
  16.  
  17.   pack .update.down -side bottom -fill x
  18.   pack .update.left -side left -fill y
  19.   pack .update.right -side left -fill both -expand 1
  20.  
  21.   label .update.lname -text "Tag Name" -anchor w
  22.  
  23.   entry .update.tname -relief sunken -textvariable updatename
  24.  
  25.   # bind_motifentry .update.tname
  26.  
  27.   pack .update.lname -in .update.left \
  28.     -side top -fill x -pady 3
  29.  
  30.   pack .update.tname -in .update.right \
  31.     -side top -fill x -pady 3
  32.  
  33.   button .update.ok -text "OK" \
  34.     -command {
  35.       eval "cvs_update $updatename [workdir_list_marked_files]"
  36.       wm withdraw .update
  37.     }
  38.   button .update.quit -text "Quit" -command { wm withdraw .update }
  39.  
  40.   pack .update.ok .update.quit -in .update.down -side left \
  41.     -ipadx 2 -ipady 2 -padx 4 -pady 4 -fill both -expand 1
  42.  
  43.   wm withdraw .update
  44.   wm title .update "Update a Module"
  45.   wm minsize .update 1 1
  46. }
  47.  
  48. proc update_run {} {
  49.   global incvs
  50.   global cvscfg
  51.  
  52.   if {! $incvs} {
  53.     cvserror "This directory is not in CVS.\nPlease import it first."
  54.     return 1
  55.   }
  56.  
  57.   wm deiconify .update
  58. }
  59.